package JET.physics.engine;

import JET.physics.Spring;
import JET.physics.interfaces.SceneTreeNode;
import java.util.ArrayList;


/**
 *
 * @author 057Ry
 */
public class SpringsTreeNode implements SceneTreeNode {

    ArrayList<Spring> springList;

    public SpringsTreeNode(ArrayList<Spring> springList) {
        this.springList = springList;
    }

    public SceneTreeNode getChild(int index) {
        return (SceneTreeNode) springList.get(index);
    }

    public int getChildCount() {
        return springList.size();
    }

    public boolean isLeaf() {
        return springList.isEmpty();
    }

    public int getIndexOfChild(Object child) {
        return springList.indexOf(child);
    }
    public void resetNodeValue(Object o) {}

    public String toString() {
        return "Springs";
    }
}